package cc.geguol.iodemo.arraydemo;

import java.io.CharArrayReader;
import java.io.CharArrayWriter;
import java.io.IOException;

import jdk.nashorn.internal.ir.WhileNode;

/**
 * 作者：13687
 * 日期：2017/6/18
 * 项目：IODemo
 * 描述：字节数组操作
 *
 */
public class CharArrayTest {
	public static void main(String[] args) throws IOException {
		CharArrayReader charArrayReader = new CharArrayReader("wo ai da ya".toCharArray());
		CharArrayWriter charArrayWriter = new CharArrayWriter();
		int ch;
		while ((ch = charArrayReader.read())!=-1){
			charArrayWriter.write(ch);
		}
		System.out.println("chas:"+charArrayWriter.toString());
	}
}
